# 作业一
def cur_exchange(nWorth):
    if nWorth[-1] in ['$']:
        CNY = (eval(nWorth[0:-1])) * 6.8833
        print("可兑换的人民币为：%.3f" % CNY)
    elif nWorth[-1] in ['￥']:
        USD = (eval(nWorth[0:-1])) * 0.1452
        print("可兑换的美元为%.3f" % USD)
    else:
        print("输入有误")
while True:
    nWorth = input("请依次输入人民币与符号（￥/$）:")
    cur_exchange(nWorth)
